<?php

namespace App\Http\Controllers\Home;

use App\Models\Site;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class AppController extends Controller
{
    /**
     * 司机用户协议
     * @param Request $request
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function driverProtocol(Request $request)
    {
        $value = Site::where('type', 'app')
            ->where('key', 'driver_protocol')
            ->value('value');

        return view('home.app.driver_protocol', compact('value'));
    }

    /**
     * 货主协议
     * @param Request $request
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function ownerProtocol(Request $request)
    {
        $value = Site::where('type', 'app')
            ->where('key', 'owner_protocol')
            ->value('value');

        return view('home.app.driver_protocol', compact('value'));
    }
}
